/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.songlin.houxin.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.songlin.houxin.admin.api.dto.*;
import com.songlin.houxin.admin.api.entity.Order;
import com.songlin.houxin.admin.api.vo.ActiveStatisticVO;
import com.songlin.houxin.admin.api.vo.BasePageVO;
import com.songlin.houxin.admin.api.vo.OrderVO;
import com.songlin.houxin.admin.api.vo.StatisticVO;
import com.songlin.houxin.common.core.util.R;
import org.springframework.validation.BindingResult;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单表
 *
 * @author pig code generator
 * @date 2022-03-06 08:13:05
 */

public interface OrderService extends IService<Order> {
    /**
     * 订单列表查询
     *
     * @param dto 入参信息
     * @return
     */
    BasePageVO<OrderVO> queryOrderList(OrderListDTO dto);

    /**
     * @param dto 入参信息
     */
    void updateOrder(OrderUpdateDTO dto);


    void deleteBatchOrder(OrderDeleteDTO dto);

    R importOrder(List<ETCDetailDTO> voList, BindingResult bindingResult);

    Long totalRebate(Integer channelId, Integer deviceStatus, LocalDateTime localDateTime);

    ActiveStatisticVO queryActiveStatisticInfo(ActiveStatisticDTO dto);

    Integer statisticActiveCount(LocalDateTime currentDayStart, Integer channelId);

    R importDevice(List<ImportOrderDTO> voList, BindingResult bindingResult);

    StatisticVO queryStatisticInfo(ActiveStatisticDTO dto);
}
